package com.mbengue.corp.artisan.utils;

public enum TypeComposant {
  FACTURE("Facture"), DEVIS("Devis"), FEUILLE("Feuille"), ARTICLE("Article"), CLIENT("Client");
  private String nom;

  TypeComposant(String composant) {
    this.nom = composant;
  }

  public String getNom() {
    return nom;
  }

  public static TypeComposant valeurDe(String type) {
    if (type.equals("Feuille")) {
      return TypeComposant.FEUILLE;
    } else if (type.equals("Facture")) {
      return TypeComposant.FACTURE;
    } else if (type.equals("Devis")) {
      return TypeComposant.DEVIS;
    } else if (type.equals("Article")) {
      return TypeComposant.ARTICLE;
    } else {
      return TypeComposant.CLIENT;
    }
  }
}
